Systems and methods for frequency compensation of real-time-clock systems

ABSTRACT

Method and system for temperature-dependent frequency compensation. For example, the method for temperature-dependent frequency compensation includes determining a first frequency compensation as a first function of temperature using one or more crystal oscillators, processing information associated with the first frequency compensation as the first function of temperature, and determining a second frequency compensation for a crystal oscillator as a second function of temperature based on at least information associated with the first frequency compensation as the first function of temperature. The one or more crystal oscillators do not include the crystal oscillator, and the first frequency compensation as the first function of temperature is different from the second frequency compensation as the second function of temperature.

1. CROSS-REFERENCES TO RELATED APPLICATIONS

This application claims priority to Chinese Patent Application No.201710542448.X, filed Jul. 10, 2017, incorporated by reference hereinfor all purposes.

2. BACKGROUND OF THE INVENTION

Certain embodiments of the present invention are directed to real-timeclocks. More particularly, some embodiments of the invention providesystems and methods for frequency compensation of real-time clocks.Merely by way of example, some embodiments of the invention have beenapplied to temperature-dependent frequency compensation. But it would berecognized that the invention has a much broader range of applicability.

Real-time clocks (RTCs) often are used in electronics products toprovide clocking or time-setting. These electronic products includemobile phones, digital cameras, computers, alarm clocks, electricitymeters, watches, and/or smart home appliances. For real-time clocks,crystal oscillators often serve as driving sources, and frequencyprecision of the crystal oscillators usually determine precision of thereal-time clocks. Conventional crystal oscillators often have afrequency precision error in the range of ±20 ppm at the roomtemperature and in the range wider than ±100 ppm at a higher temperature(e.g., at 70° C.) or at a lower temperature (e.g., at −30° C.).Specifically, ±20 ppm represents an error range of ±2 seconds per day,and ±100 ppm represents an error range of ±10 seconds per day. Suchprecision error ranges may not be acceptable under certaincircumstances.

Frequency changes of crystal oscillators with temperature often can becurve-fitted, and the corresponding fitting coefficients can be obtained(e.g., through multiple iterations). For example, the desired frequencyminus the actual frequency is represented by the frequency compensation.In another example, for a crystal oscillator, its frequency compensationas a function of temperature is as follows:

Δf=aT ³ +bT ² +cT+d  (Equation 1)

where Δf represents the frequency compensation for the crystaloscillator, which is the desired frequency minus the actual frequency.Additionally, T represents the temperature of the crystal oscillator,and a, b, c and d represent coefficients.

Usually, the coefficients a, b, c and d are predetermined by measuringactual frequencies of the crystal oscillator at four differenttemperatures, and calculating the corresponding frequency compensationvalues at these four temperatures. For example, at each of these fourtemperatures, a real-time-clock system that contains the crystaloscillator is placed at that particular temperature (e.g., as measuredby a temperature sensor) for a period of time in order to achievethermal equilibrium of the system. Such period of time needed for eachmeasurement often renders the calibration process inefficient. Eachcrystal oscillator needs to be measured at four different temperaturesto determine its coefficients a, b, c and d as shown in Equation 1, andthese four measurements need to be repeated for different crystaloscillators that may have different coefficient values.

In contrast, temperature-compensated crystal oscillators (TCXOs) usuallyhave smaller frequency precision errors, but they often are much moreexpensive. The temperature-compensated crystal oscillators often are notfeasible for low-cost designs.

Hence it is highly desirable to improve the techniques of temperaturecompensation for real-time-clock (RTC) systems.

3. BRIEF SUMMARY OF THE INVENTION

Certain embodiments of the present invention are directed to real-timeclocks. More particularly, some embodiments of the invention providesystems and methods for frequency compensation of real-time clocks.Merely by way of example, some embodiments of the invention have beenapplied to temperature-dependent frequency compensation. But it would berecognized that the invention has a much broader range of applicability.

According to one embodiment, a method for temperature-dependentfrequency compensation includes determining a first frequencycompensation as a first function of temperature using one or morecrystal oscillators, processing information associated with the firstfrequency compensation as the first function of temperature, anddetermining a second frequency compensation for a crystal oscillator asa second function of temperature based on at least informationassociated with the first frequency compensation as the first functionof temperature. The one or more crystal oscillators do not include thecrystal oscillator, and the first frequency compensation as the firstfunction of temperature is different from the second frequencycompensation as the second function of temperature.

According to another embodiment, a method for temperature-dependentfrequency compensation includes determining a first frequencycompensation as a first function of temperature using one or morecrystal oscillators, processing information associated with the firstfrequency compensation as the first function of temperature, anddetermining a second frequency compensation for a crystal oscillator asa second function of temperature based on at least informationassociated with the first frequency compensation as the first functionof temperature. The first function of temperature is configured toprovide multiple first compensation values for the first frequencycompensation in response to multiple first temperatures respectively,and the second function of temperature is configured to provide multiplesecond compensation values for the second frequency compensation inresponse to multiple second temperatures respectively.

Depending upon embodiment, one or more benefits may be achieved. Thesebenefits and various additional objects, features and advantages of thepresent invention can be fully appreciated with reference to thedetailed description and accompanying drawings that follow.

4. BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a simplified diagram showing a method fortemperature-dependent frequency compensation for one or morereal-time-clock systems according to an embodiment of the presentinvention.

FIG. 2(A) is a simplified diagram showing the process for determininggeneral frequency compensation as a function of temperature using one ormore sample crystal oscillators as part of the method fortemperature-dependent frequency compensation according to an embodimentof the present invention.

FIG. 2(B) is a simplified diagram showing the process for determiningspecific frequency compensation as a function of temperature for acrystal oscillator as part of the method for temperature-dependentfrequency compensation according to an embodiment of the presentinvention.

FIG. 2(C) is a simplified diagram showing the process 130 for performingfrequency calibration at a specific temperature for the real-time-clocksystem that includes the crystal oscillator as part of the method 100for temperature-dependent frequency compensation according to anembodiment of the present invention.

FIG. 3 is a simplified diagram showing a temperature-dependent frequencycompensation system for one or more real-time clocks according to anembodiment of the present invention.

FIG. 4 is a simplified diagram showing an actual frequency of aone-second signal of a real-time-clock system that includes a crystaloscillator as a function of temperature without adjustment to counterthreshold according to one embodiment.

FIG. 5 is a simplified diagram showing an adjustment value to counterthreshold as a function of temperature using the method fortemperature-dependent frequency compensation as shown in FIG. 1according to an embodiment of the present invention.

FIG. 6 is a simplified diagram showing an actual frequency of aone-second signal as a function of temperature with adjustment tocounter threshold for each of six real-time-clock systems that eachinclude a crystal oscillator using the method for temperature-dependentfrequency compensation as shown in FIG. 1 according to certainembodiments of the present invention.

5. DETAILED DESCRIPTION OF THE INVENTION

Certain embodiments of the present invention are directed to real-timeclocks. More particularly, some embodiments of the invention providesystems and methods for frequency compensation of real-time clocks.Merely by way of example, some embodiments of the invention have beenapplied to temperature-dependent frequency compensation. But it would berecognized that the invention has a much broader range of applicability.

FIG. 1 is a simplified diagram showing a method fortemperature-dependent frequency compensation for one or morereal-time-clock systems according to an embodiment of the presentinvention. This diagram is merely an example, which should not undulylimit the scope of the claims. One of ordinary skill in the art wouldrecognize many variations, alternatives, and modifications. The method100 for temperature-dependent frequency compensation includes a process110 for determining general frequency compensation as a function oftemperature using one or more sample crystal oscillators, a process 120for determining specific frequency compensation as a function oftemperature for a crystal oscillator, and a process 130 for performingfrequency calibration at a specific temperature for the real-time-clocksystem that includes the crystal oscillator.

In one embodiment, the process 110 for determining general frequencycompensation as a function of temperature is performed for a batch ofcrystal oscillators, from which the one or more sample crystaloscillators are selected. In another embodiment, the process 120 fordetermining specific frequency compensation as a function of temperatureis repeated for different crystal oscillators in the batch of crystaloscillators. In yet another embodiment, for the crystal oscillator whosespecific frequency compensation as a function of temperature has beendetermined, the process 130 for performing frequency calibration for thereal-time-clock system that includes the crystal oscillator is performedat one temperature (e.g., one ambient temperature) or is repeated atmultiple temperatures (e.g. multiple ambient temperatures).

FIG. 2(A) is a simplified diagram showing the process 110 fordetermining general frequency compensation as a function of temperatureusing one or more sample crystal oscillators as part of the method 100for temperature-dependent frequency compensation according to anembodiment of the present invention. This diagram is merely an example,which should not unduly limit the scope of the claims. One of ordinaryskill in the art would recognize many variations, alternatives, andmodifications. The process 110 for determining general frequencycompensation as a function of temperature using one or more samplecrystal oscillators includes a process 210 for selecting one or moresample crystal oscillators from a batch of crystal oscillators, aprocess 212 for measuring actual frequencies of one or more samplecrystal oscillators at certain temperatures, a process 214 fordetermining general coefficients for general frequency compensation as afunction of temperature, and a process 216 for storing generalcoefficients for general frequency compensation as a function oftemperature.

At the process 210, one or more sample crystal oscillators are selectedfrom a batch of crystal oscillators according to one embodiment. In oneembodiment, a number of sample crystal oscillators are selected (e.g.,randomly) from a batch of crystal oscillators (e.g., a same productionbatch of crystal oscillators). For example, the crystal oscillators inthe same production batch have similar relationship between frequencycompensation and temperature.

In another embodiment, the number of the one or more sample crystaloscillators is determined based on the total number of crystaloscillators in the batch. For example, the one or more sample crystaloscillators include a plurality of sample crystal oscillators. Inanother example, the more sample crystal oscillators being selected, themore accurate the general frequency compensation as a function oftemperature can be determined. In another example, tens of samplecrystal oscillators are selected from the total of hundreds of crystaloscillators in the batch. In yet another example, hundreds of samplecrystal oscillators are selected from the total of thousands of crystaloscillators in the batch.

At the process 212, actual frequencies of the one or more sample crystaloscillators are measured at certain temperatures according to oneembodiment. In one embodiment, for each of the one or more samplecrystal oscillators, actual frequencies are measured at the same set oftemperatures. For example, actual frequencies are measured at multipletemperatures for one sample crystal oscillator, and the same measurementprocess is repeated for each of the remaining sample crystal oscillatorsat the same set of multiple temperatures.

In another embodiment, the number of the temperature points in the setof temperatures is determined based at least in part on the order of afitting compensation curve that is used to represent general frequencycompensation as a function of temperature. For example, the higher theorder of the compensation curve is, the more accurate the generalfrequency compensation as a function of temperature can be determined.In another example, if the order of the fitting compensation curve is N,the number of the temperature points in the set of temperatures is N+1,where N is an integer larger than 1.

In yet another embodiment, after the number of the temperature points inthe set of temperatures is determined, values of these temperaturepoints are also determined. For example, values of the temperaturespoints are determined based at least in part on the working temperaturerange of a real-time-clock system in which the crystal oscillator is tobe included. In another example, values of the temperature points aredistributed approximately evenly in a high-temperature region, amedium-temperature region, and a low-temperature region of the workingtemperature range of the system. In yet another example, if the workingtemperature range of the real-time-clock system is from −30° C. to +70°C. and the order of the fitting compensation curve is 3, the number ofthe temperature points in the set of temperatures is equal to 4 and thevalues of these temperature points are, for example, equal to −25° C.,5° C., 35° C. and 65° C.

In yet another embodiment, a sample crystal oscillator included in areal-time-clock system is kept at each of the temperature points for aperiod of time (e.g., 30 minutes) to ensure that the thermal equilibriumis reached. For example, afterwards, the real-time-clock system is setto output a signal with a desired frequency of 1 Hz (e.g., a one-secondsignal), and the actual frequencies of the real-time clock system aremeasured at all of the temperature points in the set of temperatures, sothat the actual frequencies of the sample crystal oscillator at thesetemperature points are determined.

At the process 214, general coefficients for general frequencycompensation as a function of temperature are determined according toone embodiment. In one embodiment, at each of the temperature points,actual frequencies of all of the one or more sample crystal oscillatorsare averaged, so that an average frequency at each of the temperaturepoints is determined. For example, using the average frequency, afrequency compensation value at the corresponding temperature point isdetermined by subtracting the average frequency from the desiredfrequency (e.g., the ideal frequency). In another example, the desiredfrequency of a crystal oscillator is 32.768 KHz, but at 5° C., theaverage frequency is 32.766 KHz, so the compensation value at thetemperature of 5° C. is 0.002 KHz.

In another embodiment, after frequency compensation values at all of thetemperature points are determined, the general coefficients for generalfrequency compensation as a function of temperature are determined. Forexample, the general frequency compensation for crystal oscillator isequal to the desired frequency (e.g., the ideal frequency) minus theactual frequency. In another example, using N+1 frequency compensationvalues at N+1 temperature points, the general coefficients for thefollowing N^(th)-order fitting compensation curve are determined.

Δf _(g) =a _(N) T ^(N) +a _(N-1) T ^(N-1) + . . . +a _(n) T ^(n) + . . .+a ₁ T+a ₀  (Equation 2)

where Δf_(g) represents the general frequency compensation as a functionof temperature for crystal oscillator, which is equal to the desiredfrequency (e.g., the ideal frequency) minus the actual frequency.Additionally, T represents the temperature of the crystal oscillator.Moreover, n is smaller than or equal to N, and larger than or equal tozero, where N is an integer larger than 1. Also, an represents N+1general coefficients, with n ranging from 0 to N.

In yet another example, the fitting compensation curve as shown inEquation 2 is used to represent general frequency compensation as afunction of temperature (e.g., for the batch of crystal oscillators fromwhich the one or more sample crystal oscillators have been selected atthe process 210). In yet another example, the function (e.g., Δf_(g)) oftemperature for the general frequency compensation of crystal oscillatoris configured to provide multiple compensation values for the generalfrequency compensation of crystal oscillator in response to multipletemperature values (e.g., T) of the crystal oscillator respectively.

At the process 216, the general coefficients for general frequencycompensation as a function of temperature are stored according to oneembodiment. For example, the general coefficients a_(N), a_(N-1), . . ., a_(n), . . . , a₁, and a₀ as shown in Equation 2 are stored.

FIG. 2(B) is a simplified diagram showing the process 120 fordetermining specific frequency compensation as a function of temperaturefor a crystal oscillator as part of the method 100 fortemperature-dependent frequency compensation according to an embodimentof the present invention. This diagram is merely an example, whichshould not unduly limit the scope of the claims. One of ordinary skillin the art would recognize many variations, alternatives, andmodifications. The process 120 for determining specific frequencycompensation as a function of temperature for a crystal oscillatorincludes a process 220 for measuring an actual frequency of a crystaloscillator at a peak temperature, a process 222 for determining aspecific frequency compensation for the crystal oscillator at the peaktemperature, a process 224 for determining specific frequencycompensation as a function of temperature for the crystal oscillatorusing the specific frequency compensation for the crystal oscillator atthe peak temperature.

At the process 220, an actual frequency of a crystal oscillator at apeak temperature is measured according to one embodiment. For example,the peak temperature falls within a range of 25° C.±5° C. for thecrystal oscillators in the same batch.

In one embodiment, the peak temperature is the temperature, at which thedesired frequency (e.g., the ideal frequency) of the crystal oscillatoris the highest in comparison with the desired frequencies (e.g., theideal frequencies) at other temperatures. For example, at the peaktemperature, the actual frequency (e.g., the measured frequency) of thecrystal oscillator is also the highest in comparison with the actualfrequencies (e.g., the measured frequencies) at other temperatures. Inanother embodiment, the peak temperature is a temperature selected froma temperature range, within which the desired frequencies (e.g., theideal frequencies) of the crystal oscillator are higher in comparisonwith the desired frequencies (e.g., the ideal frequencies) attemperatures outside the temperature range. For example, at the peaktemperature, the desired frequency (e.g., the ideal frequency) of thecrystal oscillator is higher in comparison with the desired frequencies(e.g., the ideal frequencies) at temperatures outside the temperaturerange. In another example, at the peak temperature, the actual frequency(e.g., the measured frequency) of the crystal oscillator is higher incomparison with the actual frequencies (e.g., the measured frequencies)at temperatures outside the temperature range.

In yet another embodiment, the crystal oscillator is in the batch ofcrystal oscillators from which the one or more sample crystaloscillators have been selected at the process 210. For example, thecrystal oscillator is not one oscillator of the one or more samplecrystal oscillators. In yet another embodiment, the crystal oscillatorincluded in a real-time-clock system is kept at the peak temperature fora period of time (e.g., 30 minutes) to ensure that the thermalequilibrium is reached. For example, afterwards, the real-time-clocksystem is set to output a signal with a desired frequency of 1 Hz, andthen the actual frequency of the real-time-clock system is measured atthe peak temperature, so that the actual frequency of the crystaloscillator at the peak temperature is determined.

At the process 222, a specific frequency compensation for the crystaloscillator at the peak temperature is determined. For example, thespecific frequency compensation at the peak temperature is calculated asfollows:

Δf _(s_peak) =f _(d_peak) −f _(a_peak)  (Equation 3)

where Δ_(s_peak) represents the specific frequency compensation for thecrystal oscillator at the peak temperature. Additionally, f_(d_peak)represents the desired frequency (e.g., the ideal frequency) of thecrystal oscillator at the peak temperature, and f_(a_peak) representsthe actual frequency of the crystal oscillator at the peak temperature.

At the process 224, specific frequency compensation as a function oftemperature for the crystal oscillator is determined using the specificfrequency compensation for the crystal oscillator at the peaktemperature according to one embodiment. In one embodiment, based onEquation 2, the general frequency compensation at the peak temperatureis calculated as follows:

Δf _(g_peak) =a _(N) T _(peak) ^(N) +a _(N-1) T _(peak) ^(N-1) + . . .+a _(n) T _(peak) ^(n) + . . . +a ₁ T _(peak) +a ₀  (Equation 4)

where Δf_(g_peak) represents the general frequency compensation at thepeak temperature. Additionally, T_(peak) represents the peak temperatureof the crystal oscillator. Moreover, n is smaller than or equal to N,and larger than or equal to zero, where N is an integer larger than 1.Also, an represents N+1 general coefficients, with n ranging from 0 toN.

In another embodiment, based on Equations 3 and 4, a frequency offsetbetween the general compensation and the specific compensation for thecrystal oscillator at the peak temperature is determined as follows:

O _(s_peak) =Δf _(g_peak) −Δf _(s_peak)  (Equation 5)

where O_(s_peak) represents the frequency offset between the generalcompensation and the specific compensation for the crystal oscillator atthe peak temperature. Additionally, M_(g_peak) represents the generalfrequency compensation at the peak temperature as calculated accordingto Equation 4, and M_(s_peak) represents the specific frequencycompensation for the crystal oscillator at the peak temperature ascalculated according to Equation 3.

In yet another embodiment, based on Equations 2 and 5, specificfrequency compensation as a function of temperature for the crystaloscillator is determined as follows:

Δf _(s) =Δf _(g) −O _(s_peak)  (Equation 6)

where Δf_(s) represents the specific frequency compensation as afunction of temperature for the crystal oscillator. Additionally, Δf_(g)represents the general frequency compensation as a function oftemperature as calculated according to Equation 2. Moreover, O_(s_peak)represents the frequency offset between the general compensation and thespecific compensation for the crystal oscillator at the peak temperatureas calculated according to Equation 5.

In yet another embodiment, the specific frequency compensation as afunction of temperature for the crystal oscillator is equal to thedesired frequency (e.g., the ideal frequency) of the crystal oscillatorminus the actual frequency of the crystal oscillator. For example, usingEquation 2, Equation 5 becomes:

Δf _(s) =a _(N) T ^(N) +a _(N-1) T ^(N-1) + . . . +a _(n) T ^(n) + . . .+a ₁ T+(a ₀ −O _(s_peak))  (Equation 7)

where Δf_(s) represents the specific frequency compensation as afunction of temperature for the crystal oscillator, which is equal tothe desired frequency (e.g., the ideal frequency) of the crystaloscillator minus the actual frequency of the crystal oscillator.Additionally, T represents the temperature of the crystal oscillator.Moreover, n is smaller than or equal to N, and larger than or equal tozero, where N is an integer larger than 1. Also, a_(n) represents N+1general coefficients, with n ranging from 0 to N, as shown in Equation2. Additionally, O_(s_peak) represents the frequency offset between thegeneral compensation and the specific compensation for the crystaloscillator at the peak temperature as calculated according to Equation5.

In another example, the frequency offset (e.g., O_(s_peak)) between thegeneral compensation and the specific compensation for the crystaloscillator at the peak temperature is not equal to zero. In yet anotherexample, the specific frequency compensation (e.g., Δf_(s)) as afunction of temperature for the crystal oscillator is different from thegeneral frequency compensation (e.g., Δf_(g)) as a function oftemperature for crystal oscillator. In yet another example, the specificfrequency compensation (e.g., Δf_(s)) as a function of temperature forthe crystal oscillator is configured to provide multiple compensationvalues for the specific frequency compensation of the crystal oscillatorin response to multiple temperature values (e.g., T) of the crystaloscillator respectively.

FIG. 2(C) is a simplified diagram showing the process 130 for performingfrequency calibration at a specific temperature for the real-time-clocksystem that includes the crystal oscillator as part of the method 100for temperature-dependent frequency compensation according to anembodiment of the present invention. This diagram is merely an example,which should not unduly limit the scope of the claims. One of ordinaryskill in the art would recognize many variations, alternatives, andmodifications. The process 130 for performing frequency calibration at aspecific temperature for the real-time-clock system that includes thecrystal oscillator includes a process 230 for measuring an ambienttemperature of the crystal oscillator that is included in thereal-time-clock system, a process 232 for determining a frequencycompensation value at the ambient temperature using specific frequencycompensation for the crystal oscillator, and a process 234 fordetermining an adjustment value to counter threshold at the ambienttemperature for the real-time-clock system that includes the crystaloscillator.

At the process 230, an ambient temperature of the crystal oscillatorthat is included in the real-time-clock system is measured according toone embodiment. For example, the measurement is performed by atemperature sensor. In another example, the real-time clock systemincluding the crystal oscillator is placed at the ambient temperaturefor a sufficiently long period of time, and the ambient temperature isthe same as the temperature of the crystal oscillator. In yet anotherexample, for the crystal oscillator, its specific frequency compensationas a function of temperature has been determined at the process 224.

At the process 232, a frequency compensation value at the ambienttemperature using specific frequency compensation for the crystaloscillator is determined according to one embodiment. For example, basedon Equation 7, the frequency compensation value at the ambienttemperature is calculated as follows:

Δf _(s_ambient) =a _(N) T _(ambient) ^(N) +a _(N-1) T _(ambient)^(N-1) + . . . +a _(n) T _(ambient) ^(n) + . . . +a ₁ T _(ambient)+(a ₀−O _(s_peak))   (Equation 8)

where Δf_(s_ambient) represents the frequency compensation value at theambient temperature for the crystal oscillator. Additionally,T_(ambient) represents the ambient temperature. Moreover, n is smallerthan or equal to N, and larger than or equal to zero, where N is aninteger larger than 1. Also, an represents N+1 general coefficients,with n ranging from 0 to N. Additionally, O_(s_peak) represents thefrequency offset between the general compensation and the specificcompensation for the crystal oscillator at the peak temperature ascalculated according to Equation 5.

At the process 234, an adjustment value to counter threshold at theambient temperature for the real-time-clock system that includes thecrystal oscillator is determined according to one embodiment. In oneembodiment, the real-time-clock system also includes a clock-counteradjustment circuit. In another embodiment, the adjustment value tocounter threshold is determined based on the frequency compensationvalue at the ambient temperature for the crystal oscillator ascalculated according to Equation 8. For example, if the frequencycompensation value at the ambient temperature for the crystal oscillatoris larger than zero, the adjustment value to counter threshold is alsolarger than zero. In another example, if the frequency compensationvalue at the ambient temperature for the crystal oscillator is smallerthan zero, the adjustment value to counter threshold is also smallerthan zero.

In yet another embodiment, the clock-counter adjustment circuit adjuststhe counter threshold for the real-time-clock system. For example, theclock-counter adjustment circuit changes the counter threshold of aninternal signal generator for generating a signal with a desiredfrequency of 1 Hz (e.g., a one-second signal) by the real-time-clocksystem. In another example, if the adjustment value is a positive value,the clock-counter adjustment circuit increases the counter threshold,and if the adjustment value is a negative value, the clock-counteradjustment circuit decreases the counter threshold.

According to some embodiments, at the ambient temperature, if thereal-time-clock system is set to output a signal with a desiredfrequency of 1 Hz (e.g., a one-second signal) and the crystal oscillatorhas an actual frequency equal to a desired frequency of 32.768 KHz, thenthe output signal of the real-time-clock system is generated by settingthe counter threshold to 32768 and setting the signal period to be equalto a time duration during which an internal counter counts from 1 to thecounter threshold at the crystal oscillator frequency. According tocertain embodiments, if the real-time-clock system is set to output asignal with a desired frequency of 1 Hz (e.g., a one-second signal) andthe crystal oscillator has an actual frequency that is not equal to adesired frequency of 32.768 KHz (e.g., as shown in Equation 8), then theoutput signal of the real-time-clock system is generated by adjustingthe counter threshold with the adjustment value and setting the signalperiod to be equal to a time duration during which an internal countercounts from 1 to the adjusted counter threshold at the crystaloscillator frequency, where the adjusted counter threshold is equal to32768 plus the adjustment value. For example, the adjustment value isdetermined by the frequency compensation value at the ambienttemperature for the crystal oscillator as calculated according toEquation 8.

In one embodiment, at the ambient temperature, tens or hundreds ofseconds are chosen as a compensation period to improve accuracy andprecision of frequency compensation. For example, the crystal oscillatorhas a desired frequency of 32.768 KHz, but at the ambient temperature of5° C., the frequency compensation value for the crystal oscillator is+0.0025 KHz. In another example, with the frequency compensation valueof +0.0025 KHz for the crystal oscillator, if the compensation period isset to be 60 seconds, the adjustment value to the counter threshold is150 for the entire compensation period.

According to some embodiments, with adjusted counter threshold, thesignal with a desired frequency of 1 Hz (e.g., a one-second signal) thatis generated by the real-time-clock system has an actual frequency thatis close to 1 Hz or equal to 1 Hz. For example, the frequency error ofthe real-time clock system 360 is corrected (e.g., compensated at theambient temperature). In another example, the correction of thefrequency error reduces the magnitude of the frequency error. In yetanother example, the correction of the frequency error eliminates thefrequency error so that the actual frequency becomes equal to 1 Hz.

FIG. 3 is a simplified diagram showing a temperature-dependent frequencycompensation system for one or more real-time clocks according to anembodiment of the present invention. This diagram is merely an example,which should not unduly limit the scope of the claims. One of ordinaryskill in the art would recognize many variations, alternatives, andmodifications. The temperature-dependent frequency compensation system300 includes a database system 310, a storage system 320, apeak-temperature frequency-compensation determination system 330, acalibration determination system 340, and a temperature sensing system350.

According to certain embodiments, the temperature-dependent frequencycompensation system 300 is used to perform the method 100 fortemperature-dependent frequency compensation. For example, thetemperature-dependent frequency compensation system 300 is used toperform temperature-dependent frequency compensation to areal-time-clock system 360. In another example, the real-time-clock(RTC) system 360 includes a clock-counter adjustment circuit 362 and acrystal oscillator.

In one embodiment, the database system 310 is used to perform at leastthe process 214. For example, the database system 310 is configured todetermine (e.g., calculate) general coefficients for general frequencycompensation as a function of temperature for a batch of crystaloscillators from which one or more sample crystal oscillators areselected. In another example, the one or more sample crystal oscillatorsinclude a plurality of sample crystal oscillators.

In yet another example, the determined general coefficients (e.g.,general coefficients an, with n ranging from 0 to N, as shown inEquation 2) are sent to the storage system 320 (e.g., through aninterface circuit) and stored by the storage system 320 in order to beused by the calibration determination system 340. In yet anotherexample, the storage system 320 includes erasable non-volatile storagemedia (e.g., one or more flash drives and/or electrically-erasablestorage media).

In another embodiment, the peak-temperature frequency-compensationdetermination system 330 is used to perform at least the process 222.For example, the peak-temperature frequency-compensation determinationsystem 330 is configured to determine a specific frequency compensationat the peak temperature for a crystal oscillator in the batch of crystaloscillators. In another example, the peak-temperaturefrequency-compensation determination system 330 is used to repeat theprocess 222 for different crystal oscillators in the batch of crystaloscillators. In yet another example, one or more specific frequencycompensations determined at one or more corresponding peak temperaturesfor one or more corresponding crystal oscillators are sent (e.g.,through an interface circuit) to the storage system 320, which isconfigured to store the one or more specific frequency compensations.

According to one embodiment, the temperature sensing system 350 is usedto perform at least the process 230. For example, the temperaturesensing system 350 is configured to measure one or more ambienttemperatures of the one or more crystal oscillators. In another example,the temperature sensing system 350 is further configured to provide(e.g., through an interface circuit) one or more measurement datarelated to the one or more measured ambient temperatures to thecalibration determination system 340. In one embodiment, thereal-time-clock system 360 including a crystal oscillator is placed atan ambient temperature for a sufficiently long period of time, and theambient temperature is the same as the temperature of the crystaloscillator. In another embodiment, if the ambient temperature isdetected as one or more analog signals, the temperature sensing system350 converts the one or more analog signals to one or more digitalsignals and sends the one or more digital signals to the calibrationdetermination system 340.

According to another embodiment, the calibration determination system340 is used to perform at least the processes 224, 232 and 234. In oneembodiment, the calibration determination system 340 is configured todetermine one or more specific frequency compensations as one or morecorresponding functions of temperature for the one or more correspondingcrystal oscillators. For example, the calibration determination system340 performs the process 224 based at least in part on the one or morespecific frequency compensations for the one or more correspondingcrystal oscillators at the one or more corresponding peak temperaturesprovided by the storage system 320. In another example, the calibrationdetermination system 340 performs the process 224 also based at least inpart on the determined general coefficients provided by the storagesystem 320.

In another embodiment, the calibration determination system 340 isconfigured to determine (e.g., calculate) one or more frequencycompensation values at one or more corresponding ambient temperaturesusing one or more corresponding specific frequency compensations for theone or more corresponding crystal oscillators. For example, thecalibration determination system 340 performs the process 232 based atleast in part on one or more measurement data related to the one or moremeasured ambient temperatures provided by the temperature sensing system350.

In yet another embodiment, the calibration determination system 340 isfurther configured to determine one or more adjustment values to one ormore corresponding counter thresholds for one or more correspondingreal-time-clock systems (e.g., the real-time-clock system 360) thatinclude one or more corresponding crystal oscillators at one or morecorresponding ambient temperatures. For example, the calibrationdetermination system 340 is used to perform the process 234 based atleast in part on a compensation period (e.g., 1 second, tens of seconds,or hundreds of seconds) as provided by the storage system 320. Inanother example, the one or more adjustment values to the one or morecorresponding counter thresholds for the one or more correspondingreal-time-clock systems are provided by the calibration determinationsystem 340 (e.g., through an interface circuit) to the one or morecorresponding clock-counter adjustment circuits (e.g., the clock-counteradjustment circuit 362). In yet another example, the one or moreclock-counter adjustment circuits (e.g., the clock-counter adjustmentcircuit 362) adjust one or more corresponding counter thresholds for oneor more corresponding real-time-clock systems (e.g., the real-time clocksystem 360) that include the one or more corresponding clock-counteradjustment circuits (e.g., the clock-counter adjustment circuit 362).

In yet another embodiment, the calibration determination system 340 isfurther configured to determine an adjustment value to counter thresholdfor the real-time-clock system 360 that include the crystal oscillatorat the ambient temperature. For example, the calibration determinationsystem 340 performs the process 234 based at least in part on acompensation period (e.g., 1 second, tens of seconds, or hundreds ofseconds) provided by the storage system 320. In another example, theadjustment value to counter threshold for the real-time-clock system 360is provided by the calibration determination system 340 (e.g., throughan interface circuit) to the clock-counter adjustment circuit 362.

In yet another embodiment, the clock-counter adjustment circuit 362adjusts the counter threshold for the real-time-clock system 360. Forexample, the clock-counter adjustment circuit 362 changes the counterthreshold of an internal signal generator for generating a signal with adesired frequency of 1 Hz (e.g., a one-second signal) by thereal-time-clock system 360. In another example, if the adjustment valueis a positive value, the clock-counter adjustment circuit 362 increasesthe counter threshold, and if the adjustment value is a negative value,the clock-counter adjustment circuit 360 decreases the counterthreshold.

According to some embodiments, with adjusted counter threshold, thesignal with a desired frequency of 1 Hz (e.g., a one-second signal) thatis generated by the real-time-clock system 360 has an actual frequencythat is close to 1 Hz or equal to 1 Hz. For example, the frequency errorof the real-time-clock system 360 is corrected (e.g., compensated at theambient temperature through adjustment value to counter threshold). Inanother example, the correction of the frequency error reduces themagnitude of the frequency error. In yet another example, the correctionof the frequency error eliminates the frequency error so that the actualfrequency becomes equal to 1 Hz.

FIG. 4 is a simplified diagram showing an actual frequency of aone-second signal of a real-time-clock system that includes a crystaloscillator as a function of temperature without adjustment to counterthreshold according to one embodiment. As an example, the desiredfrequency (e.g., the ideal frequency) of the one-second signal is 1 Hzand the desired period (e.g., the ideal period) of the one-second signalis 1 second, but the actual frequency of the one-second signal is not aconstant equal to 1 Hz and the actual period of the one-second signal isnot a constant equal to 1 second. In another example, the actualfrequency of the one-second signal changes with temperature, and theactual period of the one-second signal changes with temperature.

As shown in FIG. 4, in a range between temperature T₀ (e.g., about −27°C.) and temperature T₁ (e.g., about 25° C.), the actual frequency of theone-second signal increases with increasing temperature (e.g., fromabout 0.99994 Hz at T₀ to about 1.00003 Hz at T₁). Also, as shown inFIG. 4, in a range between the temperature T₁ (e.g., about 25° C.) andtemperature T₂ (e.g., about 73° C.), the actual frequency of theone-second signal decreases with increasing temperature (e.g., fromabout 1.00003 Hz at T₁ to about 0.999945 Hz at T₂).

FIG. 5 is a simplified diagram showing an adjustment value to counterthreshold as a function of temperature using the method fortemperature-dependent frequency compensation as shown in FIG. 1according to an embodiment of the present invention. This diagram ismerely an example, which should not unduly limit the scope of theclaims. One of ordinary skill in the art would recognize manyvariations, alternatives, and modifications. As an example, the dataassociated with the relationship between the adjustment value and thetemperature are obtained by performing at least the process 130 atmultiple ambient temperatures. In another example, the adjustment valuechanges with temperature.

As shown in FIG. 5, in a range between the temperature T₀ (e.g., about−27° C.) and the temperature T₁ (e.g., about 25° C.), the adjustmentvalue to counter threshold decreases with increasing temperature (e.g.,from about 39 at T₀ to about −19 at T₁) according to one embodiment.Also as shown in FIG. 5, in a range between the temperature T₁ (e.g.,about 25° C.) and the temperature T₂ (e.g., about 73° C.), theadjustment value to counter threshold increases with increasingtemperature (e.g., from about −19 at T₁ to about 37 at T₂) according toanother embodiment.

FIG. 6 is a simplified diagram showing an actual frequency of aone-second signal as a function of temperature with adjustment tocounter threshold for each of six real-time-clock systems that eachinclude a crystal oscillator using the method for temperature-dependentfrequency compensation as shown in FIG. 1 according to certainembodiments of the present invention. This diagram is merely an example,which should not unduly limit the scope of the claims. One of ordinaryskill in the art would recognize many variations, alternatives, andmodifications.

As an example, the data associated with the relationship between theactual frequency and the temperature for each of the six real-time-clocksystems are obtained by using the adjustment values obtained from theprocess 130 to adjust counter threshold through the clock-counteradjustment circuit (e.g., the clock-counter adjustment circuit 362) foreach of the six real-time-clock systems (e.g., the real-time-clocksystem 360). In another example, as shown in FIG. 6, with adjustment tocounter threshold, the difference between the actual frequency and thedesired frequency has an absolute value that is about 10 times smallerthan the absolute value of the difference between the actual frequencyand the desired frequency without adjustment to counter threshold asshown in FIG. 4.

According to another embodiment, a method for temperature-dependentfrequency compensation includes determining a first frequencycompensation as a first function of temperature using one or morecrystal oscillators, processing information associated with the firstfrequency compensation as the first function of temperature, anddetermining a second frequency compensation for a crystal oscillator asa second function of temperature based on at least informationassociated with the first frequency compensation as the first functionof temperature. The one or more crystal oscillators do not include thecrystal oscillator, and the first frequency compensation as the firstfunction of temperature is different from the second frequencycompensation as the second function of temperature. For example, themethod is implemented according to at least FIG. 1 and/or FIG. 3.

According to yet another embodiment, a method for temperature-dependentfrequency compensation includes determining a first frequencycompensation as a first function of temperature using one or morecrystal oscillators, processing information associated with the firstfrequency compensation as the first function of temperature, anddetermining a second frequency compensation for a crystal oscillator asa second function of temperature based on at least informationassociated with the first frequency compensation as the first functionof temperature. The first function of temperature is configured toprovide multiple first compensation values for the first frequencycompensation in response to multiple first temperatures respectively,and the second function of temperature is configured to provide multiplesecond compensation values for the second frequency compensation inresponse to multiple second temperatures respectively. For example, themethod is implemented according to at least FIG. 1 and/or FIG. 3.

For example, some or all components of various embodiments of thepresent invention each are, individually and/or in combination with atleast another component, implemented using one or more softwarecomponents, one or more hardware components, and/or one or morecombinations of software and hardware components. In another example,some or all components of various embodiments of the present inventioneach are, individually and/or in combination with at least anothercomponent, implemented in one or more circuits, such as one or moreanalog circuits and/or one or more digital circuits. In yet anotherexample, various embodiments and/or examples of the present inventioncan be combined.

Additionally, the methods and systems described herein may beimplemented on many different types of processing devices by programcode comprising program instructions that are executable by the deviceprocessing subsystem. The software program instructions may includesource code, object code, machine code, or any other stored data that isoperable to cause a processing system to perform the methods andoperations described herein. Other implementations may also be used,however, such as firmware or even appropriately designed hardwareconfigured to perform the methods and systems described herein.

The systems' and methods' data (e.g., associations, mappings, datainput, data output, intermediate data results, final data results, etc.)may be stored and implemented in one or more different types ofcomputer-implemented data stores, such as different types of storagedevices and programming constructs (e.g., RAM, ROM, EEPROM, Flashmemory, flat files, databases, programming data structures, programmingvariables, IF-THEN (or similar type) statement constructs, applicationprogramming interface, etc.). It is noted that data structures describeformats for use in organizing and storing data in databases, programs,memory, or other computer-readable media for use by a computer program.

The systems and methods may be provided on many different types ofcomputer-readable media including computer storage mechanisms (e.g.,CD-ROM, diskette, RAM, flash memory, computer's hard drive, DVD, etc.)that contain instructions (e.g., software) for use in execution by aprocessor to perform the methods' operations and implement the systemsdescribed herein. The computer components, software modules, functions,data stores and data structures described herein may be connecteddirectly or indirectly to each other in order to allow the flow of dataneeded for their operations. It is also noted that a module or processorincludes a unit of code that performs a software operation, and can beimplemented for example as a subroutine unit of code, or as a softwarefunction unit of code, or as an object (as in an object-orientedparadigm), or as an applet, or in a computer script language, or asanother type of computer code. The software components and/orfunctionality may be located on a single computer or distributed acrossmultiple computers depending upon the situation at hand.

The computing system can include client devices and servers. A clientdevice and server are generally remote from each other and typicallyinteract through a communication network. The relationship of clientdevice and server arises by virtue of computer programs running on therespective computers and having a client device-server relationship toeach other.

This specification contains many specifics for particular embodiments.Certain features that are described in this specification in the contextof separate embodiments can also be implemented in combination in asingle embodiment. Conversely, various features that are described inthe context of a single embodiment can also be implemented in multipleembodiments separately or in any suitable subcombination. Moreover,although features may be described above as acting in certaincombinations, one or more features from a combination can in some casesbe removed from the combination, and a combination may, for example, bedirected to a subcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various systemcomponents in the embodiments described above should not be understoodas requiring such separation in all embodiments, and it should beunderstood that the described program components and systems cangenerally be integrated together in a single software product orpackaged into multiple software products.

Although specific embodiments of the present invention have beendescribed, it is understood by those of skill in the art that there areother embodiments that are equivalent to the described embodiments.Accordingly, it is to be understood that the invention is not to belimited by the specific illustrated embodiments, but only by the scopeof the appended claims.

1. A method for temperature-dependent frequency compensation, the methodcomprising: determining a first frequency compensation as a firstfunction of temperature using one or more crystal oscillators;processing information associated with the first frequency compensationas the first function of temperature; and determining a second frequencycompensation for a crystal oscillator as a second function oftemperature based on at least information associated with the firstfrequency compensation as the first function of temperature; wherein:the one or more crystal oscillators do not include the crystaloscillator; and the first frequency compensation as the first functionof temperature is different from the second frequency compensation asthe second function of temperature.
 2. The method of claim 1 wherein thedetermining a second frequency compensation for a crystal oscillator asa second function of temperature based on at least informationassociated with the first frequency compensation as the first functionof temperature includes: measuring an actual frequency of the crystaloscillator at a selected temperature; determining a third frequencycompensation for the crystal oscillator at the selected temperaturebased at least in part on the measured actual frequency; processinginformation associated with the third frequency compensation for thecrystal oscillator at the selected temperature; and determining thesecond frequency compensation for the crystal oscillator as the secondfunction of temperature based on at least information associated withthe first frequency compensation as the first function of temperatureand the third frequency compensation for the crystal oscillator at theselected temperature. 3.-5. (canceled)
 6. The method of claim 1 whereinthe determining a first frequency compensation as a first function oftemperature using one or more crystal oscillators includes determining aplurality of coefficients for the first frequency compensation as thefirst function of temperature.
 7. The method of claim 6 wherein theplurality of coefficients is related to the first function oftemperature.
 8. The method of claim 6 wherein the determining a firstfrequency compensation as a first function of temperature using one ormore crystal oscillators includes: selecting the one or more crystaloscillators from a batch of crystal oscillators; and measuring aplurality of actual frequencies of the one or more crystal oscillatorsat a plurality of temperatures; wherein the determining a plurality ofcoefficients for the first frequency compensation as the first functionof temperature includes determining the plurality of coefficients basedon at least information associated with the plurality of measured actualfrequencies of the one or more crystal oscillators at the plurality oftemperatures.
 9. The method of claim 8 wherein the measuring a pluralityof actual frequencies of the one or more crystal oscillators at aplurality of temperatures includes, for each crystal oscillator of theone or more crystal oscillators, measuring multiple actual frequenciesat the plurality of temperatures.
 10. The method of claim 6 wherein thedetermining a first frequency compensation as a first function oftemperature using one or more crystal oscillators further includesstoring the plurality of coefficients.
 11. The method of claim 1, andfurther comprising performing a frequency calibration at a specifictemperature for a real-time-clock system, the real-time-clock systemincluding the crystal oscillator.
 12. The method of claim 11 wherein theperforming a frequency calibration at a specific temperature for areal-time-clock system includes: measuring an ambient temperature of thecrystal oscillator that is included in the real-time-clock system;determining a frequency compensation value at the ambient temperatureusing the second frequency compensation for the crystal oscillator asthe second function of temperature; and determining an adjustment valueto a counter threshold at the ambient temperature for thereal-time-clock system.
 13. The method of claim 1 wherein the one ormore crystal oscillators include a plurality of crystal oscillators. 14.A method for temperature-dependent frequency compensation, the methodcomprising: determining a first frequency compensation as a firstfunction of temperature using one or more crystal oscillators;processing information associated with the first frequency compensationas the first function of temperature; and determining a second frequencycompensation for a crystal oscillator as a second function oftemperature based on at least information associated with the firstfrequency compensation as the first function of temperature; wherein:the first function of temperature is configured to provide multiplefirst compensation values for the first frequency compensation inresponse to multiple first temperatures respectively; and the secondfunction of temperature is configured to provide multiple secondcompensation values for the second frequency compensation in response tomultiple second temperatures respectively.
 15. The method of claim 14wherein: the one or more crystal oscillators do not include the crystaloscillator; and the first frequency compensation as the first functionof temperature is different from the second frequency compensation asthe second function of temperature.
 16. The method of claim 14 whereinthe determining a second frequency compensation for a crystal oscillatoras a second function of temperature based on at least informationassociated with the first frequency compensation as the first functionof temperature includes: measuring an actual frequency of the crystaloscillator at a selected temperature; determining a third frequencycompensation for the crystal oscillator at the selected temperaturebased at least in part on the measured actual frequency; processinginformation associated with the third frequency compensation for thecrystal oscillator at the selected temperature; and determining thesecond frequency compensation for the crystal oscillator as the secondfunction of temperature based on at least information associated withthe first frequency compensation as the first function of temperatureand the third frequency compensation for the crystal oscillator at theselected temperature.
 17. The method of claim 14 wherein the determininga first frequency compensation as a first function of temperature usingone or more crystal oscillators includes determining a plurality ofcoefficients for the first frequency compensation as the first functionof temperature.
 18. The method of claim 17 wherein the plurality ofcoefficients is related to the first function of temperature.
 19. Themethod of claim 14, and further comprising performing a frequencycalibration at a specific temperature for a real-time-clock system, thereal-time-clock system including the crystal oscillator.
 20. The methodof claim 14 wherein the one or more crystal oscillators include aplurality of crystal oscillators.